class Solution:
    def generate(self, numRows: int) :
        triangle=[]
        for i in range(numRows):
            triangle.append([1]*(i+1))
        for i in range(0,numRows):
            for k in range(1,i):
                triangle[i][k]=triangle[i-1][k-1]+triangle[i-1][k]
        return triangle

